package com.mtask.task.service.impl;





import com.mtask.common.dto.vo.NotificationVo;
import com.mtask.task.config.RabbitMQConfig;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class QueueMessageSender {

    @Resource
    private RabbitTemplate rabbitTemplate;

    public void send(String key, NotificationVo msg) {
        rabbitTemplate.convertAndSend(RabbitMQConfig.ITEM_TOPIC_EXCHANGE, key, msg);

    }
}
